<?php

namespace app\admin\model\system;

use basic\BaseModel;
use traits\ModelTrait;

/**
 * @title 物流
 * Class Express
 * @package app\admin\model\system
 */
class Express extends BaseModel
{
    use ModelTrait;

    /**
     * 主键
     * @var string
     */
    protected $pk = "id";

    /**
     * 模型名称
     * @var string
     */
    protected $name = "express";

    /**
     * 查询物流
     * @param $params
     * @return array
     */
    public static function systemPage($params)
    {
        $model = new self;
        if ($params['keyword'] !== '') $model = $model->where('name|code', 'LIKE', "%$params[keyword]%");
        $model = $model->order('sort DESC,id DESC');
        return self::page($model, $params);
    }

}